﻿// ********************************
// 2010.10.27
// 主机资源OID辅助类
// Author:卢融凯
// ********************************
using System.Collections.Generic;

namespace SManage.Model.Trace
{
    /// <summary>
    /// 用于监控主机的硬盘使用情况
    /// 兼容系统:Windows系列
    /// </summary>
    public static class HostResource
    {
        public const string hostOid =".1.3.6.1.2.1.25";

        /// <summary>
        /// Host Resources Storage Group
        /// </summary>
        public static class hrStorage
        {
            public const string hrStorageOid = hostOid + ".2";
            public static Dictionary<string, string> hrStorageTypes = new Dictionary<string, string> { 
                {hrStorageOid + ".1.1","hrStorageOther"},
                {hrStorageOid + ".1.2","hrStorageRam"},
                {hrStorageOid + ".1.3","hrStorageVirtualMemory"},
                {hrStorageOid + ".1.4","hrStorageFixedDisk"},
                {hrStorageOid + ".1.5","hrStorageRemovableDisk"},
                {hrStorageOid + ".1.6","hrStorageFloppyDisk"},
                {hrStorageOid + ".1.7","hrStorageCompactDisc"},
                {hrStorageOid + ".1.8","hrStorageRamDisk"}
            };
            
            //  Replace by hrStorageTypes Dictionary type.
            //public static class hrStorageTypes
            //{
            //    public const string hrStorageTypesOid       = hrStorageOid + ".1";
                
            //    public const string hrStorageOther          = hrStorageTypesOid + ".1";
            //    public const string hrStorageRam            = hrStorageTypesOid + ".2";
            //    /// <summary>
            //    /// hrStorageVirtualMemory is temporary storage of swapped or paged memory
            //    /// </summary>
            //    public const string hrStorageVirtualMemory  = hrStorageTypesOid + ".3";
            //    public const string hrStorageFixedDisk      = hrStorageTypesOid + ".4";
            //    public const string hrStorageRemovableDisk  = hrStorageTypesOid + ".5";
            //    public const string hrStorageFloppyDisk     = hrStorageTypesOid + ".6";
            //    public const string hrStorageCompactDisc    = hrStorageTypesOid + ".7";
            //    public const string hrStorageRamDisk        = hrStorageTypesOid + ".8";
            //}
            public const string hrMemorySizes = hrStorageOid + ".2";
            public static class hrStorageTable {
                public const string hrStorageTableOid             = hrStorageOid + ".3.1";

                /// <summary>
                /// <para>A unique value for each logical storage </para>
                /// <para>area contained by the host.</para>
                /// </summary>
                public const string hrStorageIndex              = hrStorageTableOid + ".1";
                /// <summary>
                /// The type of storage represented by this entry.
                /// </summary>
                public const string hrStorageType               = hrStorageTableOid + ".2";
                /// <summary>
                /// <para>A description of the type and instance of</para>
                /// <para>the storage described by this entry.</para>
                /// </summary>
                public const string hrStorageDescr              = hrStorageTableOid + ".3";
                /// <summary>
                /// <para>The size, in bytes, of the data objects allocated from this pool.</para>
                /// <para>If this entry is monitoring sectors, blocks, buffers, or packets,</para>
                /// <para>for example, this number will commonly be greater than one. </para>
                /// <para>Otherwise this number will typically be one.</para>
                /// </summary>
                public const string hrStorageAllocationUnits    = hrStorageTableOid + ".4";
                /// <summary>
                /// <para>The size of the storage represented by this entry,</para>
                /// <para>in units of hrStorageAllocationUnits.</para>
                /// </summary>
                public const string hrStorageSize               = hrStorageTableOid + ".5";
                /// <summary>
                /// <para>The amount of the storage represented by this</para>
                /// <para>entry that is allocated, in units of</para>
                /// <para>hrStorageAllocationUnits.</para>
                /// </summary>
                public const string hrStorageUsed               = hrStorageTableOid + ".6";
                /// <summary>
                /// <para>The number of requests for storage represented by</para>
                /// <para>this entry that could not be honored due to not</para>
                /// <para>enough storage.  It should be noted that as this</para>
                /// <para>object has a SYNTAX of Counter, that it does not</para>
                /// <para>have a defined initial value.  However, it is</para>
                /// <para>recommended that this object be initialized to</para>
                /// <para>zero.</para>
                /// </summary>
                public const string hrStorageAllocationFailures = hrStorageTableOid + ".7";
            }
        }

        public static class hrDevice {
            public const string hrDeviceOid = hostOid + ".3";
            public static Dictionary<string, string> hrDeviceTypes = new Dictionary<string, string> { 
                {hrDeviceOid + ".1.1","hrDeviceOther"},
                {hrDeviceOid + ".1.2","hrDeviceUnknown"},
                {hrDeviceOid + ".1.3","hrDeviceProcessor"},
                {hrDeviceOid + ".1.4","hrDeviceNetwork"},
                {hrDeviceOid + ".1.5","hrDevicePrinter"},
                {hrDeviceOid + ".1.6","hrDeviceDiskStorage"},
                {hrDeviceOid + ".1.10","hrDeviceVideo"},
                {hrDeviceOid + ".1.11","hrDeviceAudio"},
                {hrDeviceOid + ".1.12","hrDeviceCoprocessor"},
                {hrDeviceOid + ".1.13","hrDeviceKeyboard"},
                {hrDeviceOid + ".1.14","hrDeviceModem"},
                {hrDeviceOid + ".1.15","hrDeviceParallelPort"},
                {hrDeviceOid + ".1.16","hrDevicePointing"},
                {hrDeviceOid + ".1.17","hrDeviceSerialPort"},
                {hrDeviceOid + ".1.18","hrDeviceTape"},
                {hrDeviceOid + ".1.19","hrDeviceClock"},
                {hrDeviceOid + ".1.20","hrDeviceVolatileMemory"},
                {hrDeviceOid + ".1.21","hrDeviceNonVolatileMemory"}
            };

            public static class hrProcessorTable {
                public const string hrProcessorTableOid = hrDeviceOid + ".3.1";

                public const string hrProcessorFrwID    = hrProcessorTableOid + ".1";
                public const string hrProcessorLoad     = hrProcessorTableOid + ".2";
            }
        }
    }
}
